import React, { Component } from 'react';
// import logo from './logo.svg';
// import './App.css';
import axios from 'axios';
import Button from "components/CustomButtons/Button.jsx";
import logo from "assets/img/scaulogo.png";

class App extends Component {


  constructor(props) {
    super(props)
    this.state = {
      list: []
    }
    this.handleClick = this.handleClick.bind(this)

  }

  handleClick() {
    let url = "/roomType/roomTypelist"
    axios.post(url, {

    })
      .then(function (response) {
        let data = response.data
        // alert(data);
        console.log(data);
        console.log(data.length);
      })
      .catch(function (error) {
        console.log(error);
      });
  }


  render() {
    return (
      <div className="App">
        <header className="App-header">
          <img src={logo} className="App-logo" alt="logo" />
          <h1 className="App-title">Welcome to React</h1>
        </header>
        <Button onClick={this.handleClick}>测试调用接口</Button>
      </div>
    );
  }
}

export default App;